<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isErrorPage="true" isELIgnored="false"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
        <%@include file="../../common/commonCss.jsp"%>
        <%@include file="../../common/commonJs.jsp"%>
        <script src="js/userManage.js"></script>
        <style>
            body{
                margin: 0 auto;
                padding: 10px 10px 0px 25px;
            }
        </style>
	</head>

	<body>
    <div id="userFormApp">
        <i-form ref="formValidate" :label-width="90" :model="formValidate"  :rules="ruleValidate" inline>
            <form-item prop="username" label="用户名：">
                <i-input type="text" style="width: 192px;" v-model="formValidate.username" placeholder="请输入用户名...">
                    <icon type="ios-person-outline" slot="prepend"></icon>
                </i-input>
            </form-item>
            <form-item prop="status" label="状态：">
                <i-switch v-model="formValidate.status" size="large" true-value='1' false-value='0'>
                    <span slot="open">启用</span>
                    <span slot="close">禁用</span>
                </i-switch>
            </form-item>
            <form-item label="密码：" prop="password">
                <i-input type="password" style="width: 192px;" v-model="formValidate.password" placeholder="请输入密码...">
                <icon type="ios-locked-outline" slot="prepend"></icon>
                </i-input>
            </form-item>
            <form-item prop="passwordCheck" label="确认密码：">
                <i-input type="password" style="width: 192px;" v-model="formValidate.passwordCheck" placeholder="请确认密码...">
                    <icon type="ios-locked-outline" slot="prepend"></icon>
                </i-input>
            </form-item>
            <form-item prop="roleSelect" label="角色：" :label-width="90">
                <i-select v-model="formValidate.roleSelect" multiple style="width: 487px;" placeholder="请选择角色...">
                    <i-option v-for="item in ruleValidate.roleArray" :value="item.id" :key="item.id">{{ item.roleName }}</i-option>
                </i-select>
            </form-item>
            <div style="text-align: center;">
                <i-button type="primary" :loading="formValidate.loading" @click="onSubmit('formValidate')" icon="paper-airplane">
                    <span v-if="!formValidate.loading">提交</span>
                    <span v-else>提交中...</span>
                </i-button>
                <i-button type="primary" @click="handleReset('formValidate')" :disabled="formValidate.disabledReset" icon="refresh" style="margin-left: 8px">重置</i-button>
            </div>
        </i-form>
    </div>
    <script>
        userManage.fun.initAddForm(parent.vueGridApp.item);
       // userManage.fun.initAddForm(parent.vueGridVueCtor.item);
    </script>

	</body>

</html>